using Admin.NET.Core;
using SqlSugar;

namespace Admin.NET.Application.Entity.Business;

/// <summary>
/// 余额预警规则,主要用于发短信提醒
/// </summary>
[SugarTable("WarningRule", "余额预警规则")]
[SysTable]
public class WarningRule : EntityTenant
{
	/// <summary>
	/// 规则名称
	/// </summary>
	public string Name { get; set; }

	/// <summary>
	/// 描述
	/// </summary>
	public string? Description { get; set; }

	/// <summary>
	/// 首次预警余额阈值
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? FirstThreshold { get; set; }

	/// <summary>
	/// 第二次预警余额阈值
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? SecondThreshold { get; set; }

	/// <summary>
	/// 最后一次预警余额阈值
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? LastThreshold { get; set; }

	/// <summary>
	/// 允许透支余额，超过透支额度，则自动拉闸，0：不允许透支，&gt;0：允许透支，且超过透支额度后拉闸，null：无限透支且不拉闸
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? AllowOverdrawLimit { get; set; }
}
